partial access to →variables of one of the following ANY_BIT data types: BYTE , WORD , DWORD or LWORD
The following data is necessary to address a part of a variable:
-
# = corresponding bit, byte, word, double word or long word These specifications are integer literals (ranging from 0 for the least significant part up to the literal for the most significant part).
Access to
|
for data type
|
literal
|
syntax
|
bit (BOOL )
|
BYTE
|
0 to 7
|
variable_name.%X0 to variable_name.%X7
|
WORD
|
0 to 15
|
variable_name.%X0 to variable_name.%X15
|
DWORD
|
0 to 31
|
variable_name.%X0 to variable_name.%X31
|
LWORD
|
0 to 64
|
variable_name.%X0 to variable_name.%X63
|
byte (BYTE )
|
WORD
|
0 to 1
|
variable_name.%B0 to variable_name.%B1
|
DWORD
|
0 to 3
|
variable_name.%B0 to variable_name.%B3
|
LWORD
|
0 to 7
|
variable_name.%B0 to variable_name.%B7
|
word (WORD )
|
DWORD
|
0 to 1
|
variable_name.%W0 to variable_name.%W1
|
LWORD
|
0 to 3
|
variable_name.%W0 to variable_name.%W3
|
double word (DWORD )
|
LWORD
|
0 to 1
|
variable_name.%D0 to variable_name.%D1
|
long word (LWORD )
|
LWORD
|
0
|
variable_name.%L0
|
|